import HTMLTestRunner_PY3
import yagmail
class Tools():
    def Report(self):
        report=HTMLTestRunner_PY3.HTMLTestRunner(open('hzy.html','wb'),
                                                 title='测试报告',
                                                 description='共三条测试用例')
        return report

    def send(self):
        email=yagmail.SMTP(user='103214030@qq.com',
                           password='izrcohljnjukbgic',
                           host='smtp.qq.com',
                           port=465)
        email.send(to='103214030@qq.com',
                   subject='web端自动化测试',
                   contents=['测试报告','hzy.html'])
        email.close()
        print(email)
